{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import sys\n",
    "\n",
    "import pandas as pd\n",
    "\n",
    "backtester_dir = os.path.realpath(os.path.join(os.getcwd(), '..', '..'))\n",
    "sys.path.append(backtester_dir) # Add backtester base dir to $PYTHONPATH"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_dir = os.path.join(backtester_dir, 'data')\n",
    "store_path = os.path.join(data_dir, 'options_data_full_v2.h5')\n",
    "store = pd.HDFStore(store_path, complevel=9, complib='blosc', fletcher32=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "First we move the data from a h5 store with multiple keys (one per year) to another with a single key."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "old_data = os.path.join(data_dir, 'options_data_compressed_v2.h5')\n",
    "sizes = {'optionroot': 20, 'optionalias': 20}\n",
    "underlying_categories = pd.CategoricalDtype(categories=['SPX', 'SPXW', 'SPXPM'], ordered=False)\n",
    "\n",
    "keys = ('spx_{}'.format(year) for year in range(1990, 2019))\n",
    "offset = 0\n",
    "\n",
    "for k in keys:\n",
    "    df = pd.read_hdf(old_data, key=k)\n",
    "    df['underlying'] = df['underlying'].astype(underlying_categories)\n",
    "    df.drop(columns='exchange', inplace=True)\n",
    "    \n",
    "    df.index += offset\n",
    "    offset += len(df)\n",
    "    store.append('/SPX', df, index=False, data_columns=['quotedate', 'expiration'], min_itemsize=sizes)\n",
    "    \n",
    "os.path.getsize(store_path) / 1024**2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "store.close()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Data cleaning"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We will remove contracts where `bid` _and_ `ask` columns go to 0 unexpectedly, that is, where the bid/ask price of the contract is greater than 0 for the previous and following days.  \n",
    "We will also remove contracts that have a missing `quotedate` before expiration."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>underlying</th>\n",
       "      <th>underlying_last</th>\n",
       "      <th>optionroot</th>\n",
       "      <th>type</th>\n",
       "      <th>expiration</th>\n",
       "      <th>quotedate</th>\n",
       "      <th>strike</th>\n",
       "      <th>last</th>\n",
       "      <th>bid</th>\n",
       "      <th>ask</th>\n",
       "      <th>volume</th>\n",
       "      <th>openinterest</th>\n",
       "      <th>impliedvol</th>\n",
       "      <th>delta</th>\n",
       "      <th>gamma</th>\n",
       "      <th>theta</th>\n",
       "      <th>vega</th>\n",
       "      <th>optionalias</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>0</td>\n",
       "      <td>SPX</td>\n",
       "      <td>359.69</td>\n",
       "      <td>SPX900120C00225000</td>\n",
       "      <td>call</td>\n",
       "      <td>1990-01-20</td>\n",
       "      <td>1990-01-02</td>\n",
       "      <td>225.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>135.5</td>\n",
       "      <td>135.5</td>\n",
       "      <td>0</td>\n",
       "      <td>820</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>SPX900120C00225000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1</td>\n",
       "      <td>SPX</td>\n",
       "      <td>359.69</td>\n",
       "      <td>SPX900120C00320000</td>\n",
       "      <td>call</td>\n",
       "      <td>1990-01-20</td>\n",
       "      <td>1990-01-02</td>\n",
       "      <td>320.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>40.9</td>\n",
       "      <td>40.9</td>\n",
       "      <td>0</td>\n",
       "      <td>1088</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>SPX900120C00320000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2</td>\n",
       "      <td>SPX</td>\n",
       "      <td>359.69</td>\n",
       "      <td>SPX900120C00325000</td>\n",
       "      <td>call</td>\n",
       "      <td>1990-01-20</td>\n",
       "      <td>1990-01-02</td>\n",
       "      <td>325.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>35.9</td>\n",
       "      <td>35.9</td>\n",
       "      <td>0</td>\n",
       "      <td>1252</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>SPX900120C00325000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>3</td>\n",
       "      <td>SPX</td>\n",
       "      <td>359.69</td>\n",
       "      <td>SPX900120C00330000</td>\n",
       "      <td>call</td>\n",
       "      <td>1990-01-20</td>\n",
       "      <td>1990-01-02</td>\n",
       "      <td>330.0</td>\n",
       "      <td>30.5</td>\n",
       "      <td>30.9</td>\n",
       "      <td>30.9</td>\n",
       "      <td>25</td>\n",
       "      <td>8738</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>SPX900120C00330000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4</td>\n",
       "      <td>SPX</td>\n",
       "      <td>359.69</td>\n",
       "      <td>SPX900120C00335000</td>\n",
       "      <td>call</td>\n",
       "      <td>1990-01-20</td>\n",
       "      <td>1990-01-02</td>\n",
       "      <td>335.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>26.0</td>\n",
       "      <td>26.0</td>\n",
       "      <td>0</td>\n",
       "      <td>580</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>SPX900120C00335000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  underlying  underlying_last          optionroot  type expiration  quotedate  \\\n",
       "0        SPX           359.69  SPX900120C00225000  call 1990-01-20 1990-01-02   \n",
       "1        SPX           359.69  SPX900120C00320000  call 1990-01-20 1990-01-02   \n",
       "2        SPX           359.69  SPX900120C00325000  call 1990-01-20 1990-01-02   \n",
       "3        SPX           359.69  SPX900120C00330000  call 1990-01-20 1990-01-02   \n",
       "4        SPX           359.69  SPX900120C00335000  call 1990-01-20 1990-01-02   \n",
       "\n",
       "   strike  last    bid    ask  volume  openinterest  impliedvol  delta  gamma  \\\n",
       "0   225.0   0.0  135.5  135.5       0           820         0.0    0.0    0.0   \n",
       "1   320.0   0.0   40.9   40.9       0          1088         0.0    0.0    0.0   \n",
       "2   325.0   0.0   35.9   35.9       0          1252         0.0    0.0    0.0   \n",
       "3   330.0  30.5   30.9   30.9      25          8738         0.0    0.0    0.0   \n",
       "4   335.0   0.0   26.0   26.0       0           580         0.0    0.0    0.0   \n",
       "\n",
       "   theta  vega         optionalias  \n",
       "0    0.0   0.0  SPX900120C00225000  \n",
       "1    0.0   0.0  SPX900120C00320000  \n",
       "2    0.0   0.0  SPX900120C00325000  \n",
       "3    0.0   0.0  SPX900120C00330000  \n",
       "4    0.0   0.0  SPX900120C00335000  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "full_data = os.path.join(data_dir, 'options_data_full_v2.h5')\n",
    "df = pd.read_hdf(full_data, key='/SPX')\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "240554"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['optionroot'].nunique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "16756680"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "to_clean = set()\n",
    "threshold = 0.5\n",
    "\n",
    "dates = pd.Series(index=df['quotedate'].unique())\n",
    "\n",
    "for contract, group in df.groupby('optionroot'):\n",
    "    both_zero = group.eval('bid == ask == 0.0')\n",
    "    if both_zero.any():\n",
    "        ask_diff_previous = group['ask'].diff().abs()\n",
    "        ask_diff_next = group['ask'].diff(-1).abs()\n",
    "        \n",
    "        if ((ask_diff_previous > threshold) & (ask_diff_next > threshold) & both_zero).any():\n",
    "            to_clean.add(contract)\n",
    "        else:\n",
    "            start_date, end_date = group['quotedate'].min(), group['quotedate'].max()\n",
    "            if len(dates.loc[start_date:end_date]) != len(group):\n",
    "                to_clean.add(contract)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "29394"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(to_clean)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.1221929379681901"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(to_clean) / df['optionroot'].nunique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "to_clean_mask = df[df['optionroot'].isin(to_clean)]\n",
    "clean_df = df.drop(to_clean_mask.index)\n",
    "clean_df.reset_index(drop=True, inplace=True)\n",
    "\n",
    "min_sizes = {'optionroot': 20, 'optionalias': 20}\n",
    "clean_file = os.path.join(data_dir, 'options_data_clean_v2.h5')\n",
    "clean_df.to_hdf(clean_file,\n",
    "                mode='w',\n",
    "                key='/SPX',\n",
    "                format='table',\n",
    "                data_columns=['quotedate', 'expiration'],\n",
    "                complevel=9,\n",
    "                complib='blosc:lz4',\n",
    "                fletcher32=True,\n",
    "                min_itemsize=min_sizes)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 13909922 entries, 0 to 13909921\n",
      "Data columns (total 18 columns):\n",
      "underlying         category\n",
      "underlying_last    float64\n",
      "optionroot         object\n",
      "type               category\n",
      "expiration         datetime64[ns]\n",
      "quotedate          datetime64[ns]\n",
      "strike             float64\n",
      "last               float64\n",
      "bid                float64\n",
      "ask                float64\n",
      "volume             int64\n",
      "openinterest       int64\n",
      "impliedvol         float64\n",
      "delta              float64\n",
      "gamma              float64\n",
      "theta              float64\n",
      "vega               float64\n",
      "optionalias        object\n",
      "dtypes: category(2), datetime64[ns](2), float64(10), int64(2), object(2)\n",
      "memory usage: 3.4 GB\n"
     ]
    }
   ],
   "source": [
    "clean_df.info(memory_usage='deep')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "568.1449775695801"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "os.path.getsize(clean_file) / 1024**2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1c0d21510>"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAD8CAYAAACVZ8iyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXxU1fn48c+THUggLGELaADZcQEj4oYLiIBVbKsWf7bi0tLWXWtda7Uiar/2Wy1tpaWK4lKRWvvVuiEi7iIEUBQQ2SGAJBCWkH15fn/cmzBJZiaZyWSW5Hm/Xrxy59xz7zwZ4zz3nnPuOaKqGGOMadviIh2AMcaYyLNkYIwxxpKBMcYYSwbGGGOwZGCMMQZLBsYYY4CESAcQrG7dumlWVlakwzDGmJiyYsWKvaqaUb88ZpNBVlYWOTk5kQ7DGGNiiohs81ZuzUTGGGMsGRhjjLFkYIwxBksGxhhjsGRgjDEGSwbGGBNSB4sr2HWgJNJhBMySgTHGhND4xz7g1Efei3QYAbNkYIwxIZRfWBbpEIJiycAYY4wlA2OMaQmxtoqkJQNjjGkBZZXVkQ4hIJYMjDGmBZSUV0U6hIBYMjDGmBZwsKQi0iEExJKBMca0gIfeXBfpEAJiycAYY1rAO2v3RDqEgDSaDERkrojkicjXHmWPisg3IrJaRP4jIuke++4SkY0isl5EzvMon+iWbRSROz3K+4nI5yKyQUReEpGkUP6CxhhjGteUO4NngIn1yhYBI1T1OOBb4C4AERkGTAWGu8c8ISLxIhIP/BWYBAwDLnPrAvweeExVBwL7gWua9RsZY0wE9eiYHOkQgtJoMlDVD4GCem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BmdVviIRuQO4FScZGRMylgxMW3MG8J+aWWFF5LVG6p+Os+whqvqNiGzDSQb1TQAudJ8wB0gBjsJZlnKWe/xqEfFc0/dScRYwSsBZrWwYUH/N3zFu+SfuZJlJwGdN+D2NCYglA9MWeXvSspIjzaYpHuVNna5YgB+q6vo6hc4XeIP3E5F+wG04ixftF5Fn6r2v53kXqeplTYzDmKBYn4Fpaz4Evu+25acBF7jlW4ET3e2L69W/HEBEBuFc7a/Hmd44zaPeQuCGmrnu3UnP6h8/AjjOLe8IFAEHRaQHMMnjXJ7nXgqcJiLHuOdo78ZhTEhZMjBtiqquxFk8/gvg38BH7q4/AL8UkU+Bbh6HPIGzUPpX7nFXupOYLQGG1XQg46ydmwisFpGvObLe9Wwg1W0euh1Y5sbxJbAKWAPMxVn+tMYc4C0RWaKq+ThLML7onmMpMCRUn4cxNWxuItOmicj9wGFV/UOkYzEmkuzOwBhjjN0ZGGOMsTsDY4wxWDIwxhiDJQNjjDFYMjDGGIMlA2OMMVgyMMYYA/x/xtmvPwE10Q0AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "unique_contracts_per_day = df.groupby('quotedate').apply(lambda x: x['optionroot'].nunique())\n",
    "unique_contracts_per_day.plot()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1c0c37c10>"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAD8CAYAAACVZ8iyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYX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2BkyOuFXnt94GjzGxYeI32YRwiCaVkIG2Ku39IsHj8R8A/gLfDQ78Fvmtm7wI9Ik65i2Ch9Hnhed8KJzF7AxhV1YFMsHZuNvCJmX3KnvWu7wY6hs1DPwZmhnF8DMwF5gMPECx/WmUa8JKZveHuRQRLMD4WXuN9YESifh8iVTQ3kbRpZvZzYIe7/zbZsYgkk+4MREREdwYiIqI7AxERQclARERQMhAREZQMREQEJQMREUHJQEREgP8Pt624TT2oecUAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "unique_contracts_per_day_clean = clean_df.groupby('quotedate').apply(lambda x: x['optionroot'].nunique())\n",
    "unique_contracts_per_day_clean.plot()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Previous data cleaning attempt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Our data has some zero values and missing entries that are inaccurate and could throw off our backtester, giving misleading results. We perform here a cleanup of the data."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "store_path = os.path.join(\"/Users/jrchatruc/Documents/backtester_options/allspx/\", \"options_data_v2_light.h5\")\n",
    "store = pd.HDFStore(store_path, complevel=9, complib=\"blosc\", fletcher32=True)\n",
    "underlying_dtype = pd.api.types.CategoricalDtype(\n",
    "                categories=['SPX', 'SPXW', 'SPXPM'])\n",
    "\n",
    "offset = 0\n",
    "sizes = {\"optionroot\": 20, \"optionalias\": 20}\n",
    "for year in range(1990, 2019):\n",
    "    filename = \"SPX_{}.csv\".format(year)\n",
    "    year_df = pd.read_csv(os.path.join(\"/Users/jrchatruc/Documents/backtester_options/allspx/\", filename),\n",
    "                          parse_dates=[\"expiration\", \"quotedate\"])\n",
    "    year_df.rename(columns={\" exchange\": \"exchange\"}, inplace=True)\n",
    "    year_df = year_df.astype({\"strike\": \"float\", \"optionalias\": \"object\", \"type\": \"category\",\n",
    "                              'underlying': underlying_dtype})\n",
    "    year_df = year_df.drop('optionext', axis=1)\n",
    "    year_df = year_df.drop('exchange', axis=1)\n",
    "    year_df = year_df.reset_index(drop=True)\n",
    "    year_df.index += offset\n",
    "    offset += len(year_df)\n",
    "    store.append(\"/SPX\", year_df, index=False, data_columns=True, min_itemsize=sizes)\n",
    "    print(year)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "%cd -q /Users/jrchatruc/Documents/backtester_options/allspx\n",
    "!ptrepack --complevel=9 --complib=blosc options_data_v2_light.h5 options_data_v2_light_compressed.h5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = HistoricalOptionsData(\"options_data_v2_light_compressed.h5\", key=\"/SPX\")\n",
    "schema = data.schema\n",
    "df = data._data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(16756680, 19)"
      ]
     },
     "execution_count": 96,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.065681208926828"
      ]
     },
     "execution_count": 97,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[(df['bid'] == 0) & (df['ask'] == 0)].shape[0] / df.shape[0]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "As can be seen, around $6.5\\%$ of the rows have both their bid and ask equal to zero. Some of these are because these values are going progressively down until they reach around $0.1$ or $0.05$, at which point they (sometimes) get replaced with zero. This isn't a problematic case, but it is not the only one."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>underlying</th>\n",
       "      <th>underlying_last</th>\n",
       "      <th>optionroot</th>\n",
       "      <th>type</th>\n",
       "      <th>expiration</th>\n",
       "      <th>quotedate</th>\n",
       "      <th>strike</th>\n",
       "      <th>last</th>\n",
       "      <th>bid</th>\n",
       "      <th>ask</th>\n",
       "      <th>volume</th>\n",
       "      <th>openinterest</th>\n",
       "      <th>impliedvol</th>\n",
       "      <th>delta</th>\n",
       "      <th>gamma</th>\n",
       "      <th>theta</th>\n",
       "      <th>vega</th>\n",
       "      <th>optionalias</th>\n",
       "      <th>dte</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>13359109</th>\n",
       "      <td>SPX</td>\n",
       "      <td>2276.98</td>\n",
       "      <td>SPX191220P00100000</td>\n",
       "      <td>put</td>\n",
       "      <td>2019-12-20</td>\n",
       "      <td>2017-01-06</td>\n",
       "      <td>100.0</td>\n",
       "      <td>0.15</td>\n",
       "      <td>0.10</td>\n",
       "      <td>0.15</td>\n",
       "      <td>20</td>\n",
       "      <td>773</td>\n",
       "      <td>0.3185</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX191220P00100000</td>\n",
       "      <td>1078</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13388755</th>\n",
       "      <td>SPX</td>\n",
       "      <td>2275.32</td>\n",
       "      <td>SPX191220P00100000</td>\n",
       "      <td>put</td>\n",
       "      <td>2019-12-20</td>\n",
       "      <td>2017-01-11</td>\n",
       "      <td>100.0</td>\n",
       "      <td>0.15</td>\n",
       "      <td>0.10</td>\n",
       "      <td>0.15</td>\n",
       "      <td>0</td>\n",
       "      <td>783</td>\n",
       "      <td>0.5958</td>\n",
       "      <td>-0.0002</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.2454</td>\n",
       "      <td>2.4561</td>\n",
       "      <td>SPX191220P00100000</td>\n",
       "      <td>1073</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13400173</th>\n",
       "      <td>SPX</td>\n",
       "      <td>2270.44</td>\n",
       "      <td>SPX191220P00100000</td>\n",
       "      <td>put</td>\n",
       "      <td>2019-12-20</td>\n",
       "      <td>2017-01-12</td>\n",
       "      <td>100.0</td>\n",
       "      <td>0.15</td>\n",
       "      <td>0.10</td>\n",
       "      <td>0.15</td>\n",
       "      <td>1</td>\n",
       "      <td>783</td>\n",
       "      <td>0.5940</td>\n",
       "      <td>-0.0002</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.2466</td>\n",
       "      <td>2.4588</td>\n",
       "      <td>SPX191220P00100000</td>\n",
       "      <td>1072</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13411669</th>\n",
       "      <td>SPX</td>\n",
       "      <td>2274.64</td>\n",
       "      <td>SPX191220P00100000</td>\n",
       "      <td>put</td>\n",
       "      <td>2019-12-20</td>\n",
       "      <td>2017-01-13</td>\n",
       "      <td>100.0</td>\n",
       "      <td>0.11</td>\n",
       "      <td>0.10</td>\n",
       "      <td>0.15</td>\n",
       "      <td>0</td>\n",
       "      <td>785</td>\n",
       "      <td>0.5963</td>\n",
       "      <td>-0.0002</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.2458</td>\n",
       "      <td>2.4539</td>\n",
       "      <td>SPX191220P00100000</td>\n",
       "      <td>1071</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13423111</th>\n",
       "      <td>SPX</td>\n",
       "      <td>2267.89</td>\n",
       "      <td>SPX191220P00100000</td>\n",
       "      <td>put</td>\n",
       "      <td>2019-12-20</td>\n",
       "      <td>2017-01-17</td>\n",
       "      <td>100.0</td>\n",
       "      <td>0.10</td>\n",
       "      <td>0.10</td>\n",
       "      <td>0.15</td>\n",
       "      <td>0</td>\n",
       "      <td>805</td>\n",
       "      <td>0.5986</td>\n",
       "      <td>-0.0002</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.2453</td>\n",
       "      <td>2.4442</td>\n",
       "      <td>SPX191220P00100000</td>\n",
       "      <td>1067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16740413</th>\n",
       "      <td>SPX</td>\n",
       "      <td>2351.10</td>\n",
       "      <td>SPX191220P00100000</td>\n",
       "      <td>put</td>\n",
       "      <td>2019-12-21</td>\n",
       "      <td>2018-12-24</td>\n",
       "      <td>100.0</td>\n",
       "      <td>0.05</td>\n",
       "      <td>0.05</td>\n",
       "      <td>0.10</td>\n",
       "      <td>530</td>\n",
       "      <td>14541</td>\n",
       "      <td>0.3500</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>362</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16744107</th>\n",
       "      <td>SPX</td>\n",
       "      <td>2467.70</td>\n",
       "      <td>SPX191220P00100000</td>\n",
       "      <td>put</td>\n",
       "      <td>2019-12-21</td>\n",
       "      <td>2018-12-26</td>\n",
       "      <td>100.0</td>\n",
       "      <td>0.05</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.10</td>\n",
       "      <td>0</td>\n",
       "      <td>15059</td>\n",
       "      <td>0.3219</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>360</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16747947</th>\n",
       "      <td>SPX</td>\n",
       "      <td>2488.83</td>\n",
       "      <td>SPX191220P00100000</td>\n",
       "      <td>put</td>\n",
       "      <td>2019-12-21</td>\n",
       "      <td>2018-12-27</td>\n",
       "      <td>100.0</td>\n",
       "      <td>0.05</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.05</td>\n",
       "      <td>0</td>\n",
       "      <td>15059</td>\n",
       "      <td>0.3314</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>359</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16751791</th>\n",
       "      <td>SPX</td>\n",
       "      <td>2485.74</td>\n",
       "      <td>SPX191220P00100000</td>\n",
       "      <td>put</td>\n",
       "      <td>2019-12-21</td>\n",
       "      <td>2018-12-28</td>\n",
       "      <td>100.0</td>\n",
       "      <td>0.05</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.05</td>\n",
       "      <td>500</td>\n",
       "      <td>15059</td>\n",
       "      <td>0.3256</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>358</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16755635</th>\n",
       "      <td>SPX</td>\n",
       "      <td>2506.85</td>\n",
       "      <td>SPX191220P00100000</td>\n",
       "      <td>put</td>\n",
       "      <td>2019-12-21</td>\n",
       "      <td>2018-12-31</td>\n",
       "      <td>100.0</td>\n",
       "      <td>0.05</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.05</td>\n",
       "      <td>1100</td>\n",
       "      <td>15559</td>\n",
       "      <td>0.3188</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>355</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>497 rows × 19 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         underlying  underlying_last          optionroot type expiration  \\\n",
       "13359109        SPX          2276.98  SPX191220P00100000  put 2019-12-20   \n",
       "13388755        SPX          2275.32  SPX191220P00100000  put 2019-12-20   \n",
       "13400173        SPX          2270.44  SPX191220P00100000  put 2019-12-20   \n",
       "13411669        SPX          2274.64  SPX191220P00100000  put 2019-12-20   \n",
       "13423111        SPX          2267.89  SPX191220P00100000  put 2019-12-20   \n",
       "...             ...              ...                 ...  ...        ...   \n",
       "16740413        SPX          2351.10  SPX191220P00100000  put 2019-12-21   \n",
       "16744107        SPX          2467.70  SPX191220P00100000  put 2019-12-21   \n",
       "16747947        SPX          2488.83  SPX191220P00100000  put 2019-12-21   \n",
       "16751791        SPX          2485.74  SPX191220P00100000  put 2019-12-21   \n",
       "16755635        SPX          2506.85  SPX191220P00100000  put 2019-12-21   \n",
       "\n",
       "          quotedate  strike  last   bid   ask  volume  openinterest  \\\n",
       "13359109 2017-01-06   100.0  0.15  0.10  0.15      20           773   \n",
       "13388755 2017-01-11   100.0  0.15  0.10  0.15       0           783   \n",
       "13400173 2017-01-12   100.0  0.15  0.10  0.15       1           783   \n",
       "13411669 2017-01-13   100.0  0.11  0.10  0.15       0           785   \n",
       "13423111 2017-01-17   100.0  0.10  0.10  0.15       0           805   \n",
       "...             ...     ...   ...   ...   ...     ...           ...   \n",
       "16740413 2018-12-24   100.0  0.05  0.05  0.10     530         14541   \n",
       "16744107 2018-12-26   100.0  0.05  0.00  0.10       0         15059   \n",
       "16747947 2018-12-27   100.0  0.05  0.00  0.05       0         15059   \n",
       "16751791 2018-12-28   100.0  0.05  0.00  0.05     500         15059   \n",
       "16755635 2018-12-31   100.0  0.05  0.00  0.05    1100         15559   \n",
       "\n",
       "          impliedvol   delta  gamma   theta    vega         optionalias   dte  \n",
       "13359109      0.3185  0.0000    0.0  0.0000  0.0000  SPX191220P00100000  1078  \n",
       "13388755      0.5958 -0.0002    0.0 -0.2454  2.4561  SPX191220P00100000  1073  \n",
       "13400173      0.5940 -0.0002    0.0 -0.2466  2.4588  SPX191220P00100000  1072  \n",
       "13411669      0.5963 -0.0002    0.0 -0.2458  2.4539  SPX191220P00100000  1071  \n",
       "13423111      0.5986 -0.0002    0.0 -0.2453  2.4442  SPX191220P00100000  1067  \n",
       "...              ...     ...    ...     ...     ...                 ...   ...  \n",
       "16740413      0.3500  0.0000    0.0  0.0000  0.0000                 NaN   362  \n",
       "16744107      0.3219  0.0000    0.0  0.0000  0.0000                 NaN   360  \n",
       "16747947      0.3314  0.0000    0.0  0.0000  0.0000                 NaN   359  \n",
       "16751791      0.3256  0.0000    0.0  0.0000  0.0000                 NaN   358  \n",
       "16755635      0.3188  0.0000    0.0  0.0000  0.0000                 NaN   355  \n",
       "\n",
       "[497 rows x 19 columns]"
      ]
     },
     "execution_count": 98,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# A (mostly) innocuous contract, its bid and ask values are always very close to zero, so them dipping into zero\n",
    "# is not a problem.\n",
    "df[df['optionroot'] == 'SPX191220P00100000']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This next contract, however, is a problem. On first inspection it looks fine, but it actually contains a lot of zero values intermingled."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>underlying</th>\n",
       "      <th>underlying_last</th>\n",
       "      <th>optionroot</th>\n",
       "      <th>type</th>\n",
       "      <th>expiration</th>\n",
       "      <th>quotedate</th>\n",
       "      <th>strike</th>\n",
       "      <th>last</th>\n",
       "      <th>bid</th>\n",
       "      <th>ask</th>\n",
       "      <th>volume</th>\n",
       "      <th>openinterest</th>\n",
       "      <th>impliedvol</th>\n",
       "      <th>delta</th>\n",
       "      <th>gamma</th>\n",
       "      <th>theta</th>\n",
       "      <th>vega</th>\n",
       "      <th>optionalias</th>\n",
       "      <th>dte</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>144</th>\n",
       "      <td>SPX</td>\n",
       "      <td>359.69</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-02</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>94.3</td>\n",
       "      <td>94.3</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>536</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>314</th>\n",
       "      <td>SPX</td>\n",
       "      <td>358.76</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-03</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>93.3</td>\n",
       "      <td>93.3</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>535</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>484</th>\n",
       "      <td>SPX</td>\n",
       "      <td>355.66</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-04</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>90.2</td>\n",
       "      <td>90.2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>534</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>654</th>\n",
       "      <td>SPX</td>\n",
       "      <td>352.20</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-05</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>86.6</td>\n",
       "      <td>86.6</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>533</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>824</th>\n",
       "      <td>SPX</td>\n",
       "      <td>353.79</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-08</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>88.1</td>\n",
       "      <td>88.1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>530</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>68132</th>\n",
       "      <td>SPX</td>\n",
       "      <td>380.13</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1991-06-17</td>\n",
       "      <td>300.0</td>\n",
       "      <td>81.5</td>\n",
       "      <td>80.4</td>\n",
       "      <td>80.9</td>\n",
       "      <td>1</td>\n",
       "      <td>3728</td>\n",
       "      <td>1.0531</td>\n",
       "      <td>0.9832</td>\n",
       "      <td>0.0010</td>\n",
       "      <td>-0.2442</td>\n",
       "      <td>0.0173</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>68330</th>\n",
       "      <td>SPX</td>\n",
       "      <td>378.59</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1991-06-18</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>78.5</td>\n",
       "      <td>79.0</td>\n",
       "      <td>0</td>\n",
       "      <td>3727</td>\n",
       "      <td>1.4422</td>\n",
       "      <td>0.9608</td>\n",
       "      <td>0.0016</td>\n",
       "      <td>-0.6967</td>\n",
       "      <td>0.0307</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>68528</th>\n",
       "      <td>SPX</td>\n",
       "      <td>375.09</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1991-06-19</td>\n",
       "      <td>300.0</td>\n",
       "      <td>75.5</td>\n",
       "      <td>75.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>756</td>\n",
       "      <td>3727</td>\n",
       "      <td>1.6634</td>\n",
       "      <td>0.9598</td>\n",
       "      <td>0.0017</td>\n",
       "      <td>-0.9583</td>\n",
       "      <td>0.0260</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>68726</th>\n",
       "      <td>SPX</td>\n",
       "      <td>375.42</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1991-06-20</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>75.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>0</td>\n",
       "      <td>3557</td>\n",
       "      <td>1.8106</td>\n",
       "      <td>0.9824</td>\n",
       "      <td>0.0011</td>\n",
       "      <td>-0.7040</td>\n",
       "      <td>0.0099</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>68924</th>\n",
       "      <td>SPX</td>\n",
       "      <td>377.75</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1991-06-21</td>\n",
       "      <td>300.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>77.5</td>\n",
       "      <td>78.5</td>\n",
       "      <td>132</td>\n",
       "      <td>3557</td>\n",
       "      <td>3.9547</td>\n",
       "      <td>0.9766</td>\n",
       "      <td>0.0012</td>\n",
       "      <td>-3.7758</td>\n",
       "      <td>0.0063</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>373 rows × 19 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      underlying  underlying_last          optionroot  type expiration  \\\n",
       "144          SPX           359.69  SPX910622C00300000  call 1991-06-22   \n",
       "314          SPX           358.76  SPX910622C00300000  call 1991-06-22   \n",
       "484          SPX           355.66  SPX910622C00300000  call 1991-06-22   \n",
       "654          SPX           352.20  SPX910622C00300000  call 1991-06-22   \n",
       "824          SPX           353.79  SPX910622C00300000  call 1991-06-22   \n",
       "...          ...              ...                 ...   ...        ...   \n",
       "68132        SPX           380.13  SPX910622C00300000  call 1991-06-22   \n",
       "68330        SPX           378.59  SPX910622C00300000  call 1991-06-22   \n",
       "68528        SPX           375.09  SPX910622C00300000  call 1991-06-22   \n",
       "68726        SPX           375.42  SPX910622C00300000  call 1991-06-22   \n",
       "68924        SPX           377.75  SPX910622C00300000  call 1991-06-22   \n",
       "\n",
       "       quotedate  strike  last   bid   ask  volume  openinterest  impliedvol  \\\n",
       "144   1990-01-02   300.0   0.0  94.3  94.3       0             0      0.0000   \n",
       "314   1990-01-03   300.0   0.0  93.3  93.3       0             0      0.0000   \n",
       "484   1990-01-04   300.0   0.0  90.2  90.2       0             0      0.0000   \n",
       "654   1990-01-05   300.0   0.0  86.6  86.6       0             0      0.0000   \n",
       "824   1990-01-08   300.0   0.0  88.1  88.1       0             0      0.0000   \n",
       "...          ...     ...   ...   ...   ...     ...           ...         ...   \n",
       "68132 1991-06-17   300.0  81.5  80.4  80.9       1          3728      1.0531   \n",
       "68330 1991-06-18   300.0   0.0  78.5  79.0       0          3727      1.4422   \n",
       "68528 1991-06-19   300.0  75.5  75.0  76.0     756          3727      1.6634   \n",
       "68726 1991-06-20   300.0   0.0  75.0  76.0       0          3557      1.8106   \n",
       "68924 1991-06-21   300.0  76.0  77.5  78.5     132          3557      3.9547   \n",
       "\n",
       "        delta   gamma   theta    vega         optionalias  dte  \n",
       "144    0.0000  0.0000  0.0000  0.0000  SPX910622C00300000  536  \n",
       "314    0.0000  0.0000  0.0000  0.0000  SPX910622C00300000  535  \n",
       "484    0.0000  0.0000  0.0000  0.0000  SPX910622C00300000  534  \n",
       "654    0.0000  0.0000  0.0000  0.0000  SPX910622C00300000  533  \n",
       "824    0.0000  0.0000  0.0000  0.0000  SPX910622C00300000  530  \n",
       "...       ...     ...     ...     ...                 ...  ...  \n",
       "68132  0.9832  0.0010 -0.2442  0.0173  SPX910622C00300000    5  \n",
       "68330  0.9608  0.0016 -0.6967  0.0307  SPX910622C00300000    4  \n",
       "68528  0.9598  0.0017 -0.9583  0.0260  SPX910622C00300000    3  \n",
       "68726  0.9824  0.0011 -0.7040  0.0099  SPX910622C00300000    2  \n",
       "68924  0.9766  0.0012 -3.7758  0.0063  SPX910622C00300000    1  \n",
       "\n",
       "[373 rows x 19 columns]"
      ]
     },
     "execution_count": 99,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "problematic = df[df['optionroot'] == 'SPX910622C00300000']\n",
    "problematic"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>underlying</th>\n",
       "      <th>underlying_last</th>\n",
       "      <th>optionroot</th>\n",
       "      <th>type</th>\n",
       "      <th>expiration</th>\n",
       "      <th>quotedate</th>\n",
       "      <th>strike</th>\n",
       "      <th>last</th>\n",
       "      <th>bid</th>\n",
       "      <th>ask</th>\n",
       "      <th>volume</th>\n",
       "      <th>openinterest</th>\n",
       "      <th>impliedvol</th>\n",
       "      <th>delta</th>\n",
       "      <th>gamma</th>\n",
       "      <th>theta</th>\n",
       "      <th>vega</th>\n",
       "      <th>optionalias</th>\n",
       "      <th>dte</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>824</th>\n",
       "      <td>SPX</td>\n",
       "      <td>353.79</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-08</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>88.1</td>\n",
       "      <td>88.1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>530</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>994</th>\n",
       "      <td>SPX</td>\n",
       "      <td>349.62</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-09</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>83.8</td>\n",
       "      <td>83.8</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>529</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1164</th>\n",
       "      <td>SPX</td>\n",
       "      <td>347.31</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-10</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>81.4</td>\n",
       "      <td>81.4</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>528</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1334</th>\n",
       "      <td>SPX</td>\n",
       "      <td>348.53</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-11</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>82.6</td>\n",
       "      <td>82.6</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>527</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1504</th>\n",
       "      <td>SPX</td>\n",
       "      <td>339.93</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-12</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>526</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1674</th>\n",
       "      <td>SPX</td>\n",
       "      <td>337.00</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-15</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>70.8</td>\n",
       "      <td>70.8</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>523</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1844</th>\n",
       "      <td>SPX</td>\n",
       "      <td>340.75</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-16</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>74.5</td>\n",
       "      <td>74.5</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>522</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2026</th>\n",
       "      <td>SPX</td>\n",
       "      <td>337.40</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-17</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>71.1</td>\n",
       "      <td>71.1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>521</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2208</th>\n",
       "      <td>SPX</td>\n",
       "      <td>338.19</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-18</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>520</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2391</th>\n",
       "      <td>SPX</td>\n",
       "      <td>339.15</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-19</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>519</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2548</th>\n",
       "      <td>SPX</td>\n",
       "      <td>330.38</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-22</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>63.8</td>\n",
       "      <td>64.5</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0926</td>\n",
       "      <td>0.9776</td>\n",
       "      <td>0.0015</td>\n",
       "      <td>-22.3628</td>\n",
       "      <td>20.9095</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>516</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2705</th>\n",
       "      <td>SPX</td>\n",
       "      <td>331.61</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-23</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>65.0</td>\n",
       "      <td>65.5</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0904</td>\n",
       "      <td>0.9816</td>\n",
       "      <td>0.0013</td>\n",
       "      <td>-22.3658</td>\n",
       "      <td>17.7692</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>515</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2862</th>\n",
       "      <td>SPX</td>\n",
       "      <td>330.26</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-24</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>63.5</td>\n",
       "      <td>64.2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0896</td>\n",
       "      <td>0.9806</td>\n",
       "      <td>0.0013</td>\n",
       "      <td>-22.3636</td>\n",
       "      <td>18.4703</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>514</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3022</th>\n",
       "      <td>SPX</td>\n",
       "      <td>326.08</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-25</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>59.7</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>513</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3182</th>\n",
       "      <td>SPX</td>\n",
       "      <td>325.80</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-26</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>59.0</td>\n",
       "      <td>59.7</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0887</td>\n",
       "      <td>0.9747</td>\n",
       "      <td>0.0017</td>\n",
       "      <td>-22.3457</td>\n",
       "      <td>22.7432</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3344</th>\n",
       "      <td>SPX</td>\n",
       "      <td>325.20</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>call</td>\n",
       "      <td>1991-06-22</td>\n",
       "      <td>1990-01-29</td>\n",
       "      <td>300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>58.2</td>\n",
       "      <td>59.3</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0957</td>\n",
       "      <td>0.9644</td>\n",
       "      <td>0.0021</td>\n",
       "      <td>-22.3769</td>\n",
       "      <td>30.0972</td>\n",
       "      <td>SPX910622C00300000</td>\n",
       "      <td>509</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     underlying  underlying_last          optionroot  type expiration  \\\n",
       "824         SPX           353.79  SPX910622C00300000  call 1991-06-22   \n",
       "994         SPX           349.62  SPX910622C00300000  call 1991-06-22   \n",
       "1164        SPX           347.31  SPX910622C00300000  call 1991-06-22   \n",
       "1334        SPX           348.53  SPX910622C00300000  call 1991-06-22   \n",
       "1504        SPX           339.93  SPX910622C00300000  call 1991-06-22   \n",
       "1674        SPX           337.00  SPX910622C00300000  call 1991-06-22   \n",
       "1844        SPX           340.75  SPX910622C00300000  call 1991-06-22   \n",
       "2026        SPX           337.40  SPX910622C00300000  call 1991-06-22   \n",
       "2208        SPX           338.19  SPX910622C00300000  call 1991-06-22   \n",
       "2391        SPX           339.15  SPX910622C00300000  call 1991-06-22   \n",
       "2548        SPX           330.38  SPX910622C00300000  call 1991-06-22   \n",
       "2705        SPX           331.61  SPX910622C00300000  call 1991-06-22   \n",
       "2862        SPX           330.26  SPX910622C00300000  call 1991-06-22   \n",
       "3022        SPX           326.08  SPX910622C00300000  call 1991-06-22   \n",
       "3182        SPX           325.80  SPX910622C00300000  call 1991-06-22   \n",
       "3344        SPX           325.20  SPX910622C00300000  call 1991-06-22   \n",
       "\n",
       "      quotedate  strike  last   bid   ask  volume  openinterest  impliedvol  \\\n",
       "824  1990-01-08   300.0   0.0  88.1  88.1       0             0      0.0000   \n",
       "994  1990-01-09   300.0   0.0  83.8  83.8       0             0      0.0000   \n",
       "1164 1990-01-10   300.0   0.0  81.4  81.4       0             0      0.0000   \n",
       "1334 1990-01-11   300.0   0.0  82.6  82.6       0             0      0.0000   \n",
       "1504 1990-01-12   300.0   0.0   0.0   0.0       0             0      0.0000   \n",
       "1674 1990-01-15   300.0   0.0  70.8  70.8       0             0      0.0000   \n",
       "1844 1990-01-16   300.0   0.0  74.5  74.5       0             0      0.0000   \n",
       "2026 1990-01-17   300.0   0.0  71.1  71.1       0             0      0.0000   \n",
       "2208 1990-01-18   300.0   0.0   0.0   0.0       0             0      0.0000   \n",
       "2391 1990-01-19   300.0   0.0   0.0   0.0       0             0      0.0000   \n",
       "2548 1990-01-22   300.0   0.0  63.8  64.5       0             0      0.0926   \n",
       "2705 1990-01-23   300.0   0.0  65.0  65.5       0             0      0.0904   \n",
       "2862 1990-01-24   300.0   0.0  63.5  64.2       0             0      0.0896   \n",
       "3022 1990-01-25   300.0   0.0   0.0  59.7       0             0      0.0000   \n",
       "3182 1990-01-26   300.0   0.0  59.0  59.7       0             0      0.0887   \n",
       "3344 1990-01-29   300.0   0.0  58.2  59.3       0             0      0.0957   \n",
       "\n",
       "       delta   gamma    theta     vega         optionalias  dte  \n",
       "824   0.0000  0.0000   0.0000   0.0000  SPX910622C00300000  530  \n",
       "994   0.0000  0.0000   0.0000   0.0000  SPX910622C00300000  529  \n",
       "1164  0.0000  0.0000   0.0000   0.0000  SPX910622C00300000  528  \n",
       "1334  0.0000  0.0000   0.0000   0.0000  SPX910622C00300000  527  \n",
       "1504  0.0000  0.0000   0.0000   0.0000  SPX910622C00300000  526  \n",
       "1674  0.0000  0.0000   0.0000   0.0000  SPX910622C00300000  523  \n",
       "1844  0.0000  0.0000   0.0000   0.0000  SPX910622C00300000  522  \n",
       "2026  0.0000  0.0000   0.0000   0.0000  SPX910622C00300000  521  \n",
       "2208  0.0000  0.0000   0.0000   0.0000  SPX910622C00300000  520  \n",
       "2391  0.0000  0.0000   0.0000   0.0000  SPX910622C00300000  519  \n",
       "2548  0.9776  0.0015 -22.3628  20.9095  SPX910622C00300000  516  \n",
       "2705  0.9816  0.0013 -22.3658  17.7692  SPX910622C00300000  515  \n",
       "2862  0.9806  0.0013 -22.3636  18.4703  SPX910622C00300000  514  \n",
       "3022  0.0000  0.0000   0.0000   0.0000  SPX910622C00300000  513  \n",
       "3182  0.9747  0.0017 -22.3457  22.7432  SPX910622C00300000  512  \n",
       "3344  0.9644  0.0021 -22.3769  30.0972  SPX910622C00300000  509  "
      ]
     },
     "execution_count": 100,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "problematic[4:20]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(34, 19)"
      ]
     },
     "execution_count": 101,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "problematic[problematic['bid'] == 0].shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Of $373$ total rows, $34$ of them have their bid equal to zero even though the non-zero values in between are never even close to zero. These types of contracts happen all throughout the dataset and need to be addressed. We will drop contracts that have an entry with both their ask and bid equal to zero. This means of course that we will also be dropping some contracts with correct values, but we are willing to make that tradeoff."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Here's an example of a contract with all its bid and ask entries set to zero."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>underlying</th>\n",
       "      <th>underlying_last</th>\n",
       "      <th>optionroot</th>\n",
       "      <th>type</th>\n",
       "      <th>expiration</th>\n",
       "      <th>quotedate</th>\n",
       "      <th>strike</th>\n",
       "      <th>last</th>\n",
       "      <th>bid</th>\n",
       "      <th>ask</th>\n",
       "      <th>volume</th>\n",
       "      <th>openinterest</th>\n",
       "      <th>impliedvol</th>\n",
       "      <th>delta</th>\n",
       "      <th>gamma</th>\n",
       "      <th>theta</th>\n",
       "      <th>vega</th>\n",
       "      <th>optionalias</th>\n",
       "      <th>dte</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>117271</th>\n",
       "      <td>SPX</td>\n",
       "      <td>409.76</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-06-12</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.5202</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0025</td>\n",
       "      <td>0.0035</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>117505</th>\n",
       "      <td>SPX</td>\n",
       "      <td>410.29</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-06-15</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.031</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>250</td>\n",
       "      <td>0</td>\n",
       "      <td>0.5463</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0028</td>\n",
       "      <td>0.0034</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>117743</th>\n",
       "      <td>SPX</td>\n",
       "      <td>408.32</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-06-16</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.5485</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0029</td>\n",
       "      <td>0.0033</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>117981</th>\n",
       "      <td>SPX</td>\n",
       "      <td>402.26</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-06-17</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>0.5408</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0029</td>\n",
       "      <td>0.0033</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>118219</th>\n",
       "      <td>SPX</td>\n",
       "      <td>400.96</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-06-18</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>0.5452</td>\n",
       "      <td>-0.0009</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0031</td>\n",
       "      <td>0.0033</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>118457</th>\n",
       "      <td>SPX</td>\n",
       "      <td>403.67</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-06-19</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>0.5618</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0032</td>\n",
       "      <td>0.0032</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>118645</th>\n",
       "      <td>SPX</td>\n",
       "      <td>403.40</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-06-22</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>0.5933</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0035</td>\n",
       "      <td>0.0030</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>118833</th>\n",
       "      <td>SPX</td>\n",
       "      <td>404.04</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-06-23</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>0.6072</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0037</td>\n",
       "      <td>0.0030</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>119021</th>\n",
       "      <td>SPX</td>\n",
       "      <td>403.84</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-06-24</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>0.6194</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0039</td>\n",
       "      <td>0.0029</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>119209</th>\n",
       "      <td>SPX</td>\n",
       "      <td>403.12</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-06-25</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>0.6311</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0040</td>\n",
       "      <td>0.0029</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>119397</th>\n",
       "      <td>SPX</td>\n",
       "      <td>403.45</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-06-26</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>0.6466</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0042</td>\n",
       "      <td>0.0028</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>119585</th>\n",
       "      <td>SPX</td>\n",
       "      <td>408.94</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-06-29</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>0.7150</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0049</td>\n",
       "      <td>0.0025</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>119773</th>\n",
       "      <td>SPX</td>\n",
       "      <td>408.14</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-06-30</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>0.7327</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0052</td>\n",
       "      <td>0.0025</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>119961</th>\n",
       "      <td>SPX</td>\n",
       "      <td>412.88</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-07-01</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>0.7704</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0056</td>\n",
       "      <td>0.0024</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>120149</th>\n",
       "      <td>SPX</td>\n",
       "      <td>411.79</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-07-02</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>0.7914</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0059</td>\n",
       "      <td>0.0023</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>120339</th>\n",
       "      <td>SPX</td>\n",
       "      <td>413.84</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-07-06</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>0.9286</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0080</td>\n",
       "      <td>0.0020</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>120529</th>\n",
       "      <td>SPX</td>\n",
       "      <td>409.16</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-07-07</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>0.9527</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0087</td>\n",
       "      <td>0.0019</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>120719</th>\n",
       "      <td>SPX</td>\n",
       "      <td>410.28</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-07-08</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>1.0074</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0097</td>\n",
       "      <td>0.0018</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>120909</th>\n",
       "      <td>SPX</td>\n",
       "      <td>414.22</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-07-09</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>1.0846</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0109</td>\n",
       "      <td>0.0017</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>121099</th>\n",
       "      <td>SPX</td>\n",
       "      <td>414.62</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-07-10</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>1.1581</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0124</td>\n",
       "      <td>0.0016</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>121289</th>\n",
       "      <td>SPX</td>\n",
       "      <td>414.87</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-07-13</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>1.5091</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0209</td>\n",
       "      <td>0.0012</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>121479</th>\n",
       "      <td>SPX</td>\n",
       "      <td>417.68</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-07-14</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>1.7409</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0273</td>\n",
       "      <td>0.0010</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>121669</th>\n",
       "      <td>SPX</td>\n",
       "      <td>417.10</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-07-15</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>2.0753</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0390</td>\n",
       "      <td>0.0009</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>121859</th>\n",
       "      <td>SPX</td>\n",
       "      <td>417.54</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-07-16</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>2.7500</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.0683</td>\n",
       "      <td>0.0007</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>122049</th>\n",
       "      <td>SPX</td>\n",
       "      <td>415.62</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>put</td>\n",
       "      <td>1992-07-18</td>\n",
       "      <td>1992-07-17</td>\n",
       "      <td>250.0</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>250</td>\n",
       "      <td>5.4547</td>\n",
       "      <td>-0.0008</td>\n",
       "      <td>0.0</td>\n",
       "      <td>-0.2727</td>\n",
       "      <td>0.0003</td>\n",
       "      <td>SPX920718P00250000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       underlying  underlying_last          optionroot type expiration  \\\n",
       "117271        SPX           409.76  SPX920718P00250000  put 1992-07-18   \n",
       "117505        SPX           410.29  SPX920718P00250000  put 1992-07-18   \n",
       "117743        SPX           408.32  SPX920718P00250000  put 1992-07-18   \n",
       "117981        SPX           402.26  SPX920718P00250000  put 1992-07-18   \n",
       "118219        SPX           400.96  SPX920718P00250000  put 1992-07-18   \n",
       "118457        SPX           403.67  SPX920718P00250000  put 1992-07-18   \n",
       "118645        SPX           403.40  SPX920718P00250000  put 1992-07-18   \n",
       "118833        SPX           404.04  SPX920718P00250000  put 1992-07-18   \n",
       "119021        SPX           403.84  SPX920718P00250000  put 1992-07-18   \n",
       "119209        SPX           403.12  SPX920718P00250000  put 1992-07-18   \n",
       "119397        SPX           403.45  SPX920718P00250000  put 1992-07-18   \n",
       "119585        SPX           408.94  SPX920718P00250000  put 1992-07-18   \n",
       "119773        SPX           408.14  SPX920718P00250000  put 1992-07-18   \n",
       "119961        SPX           412.88  SPX920718P00250000  put 1992-07-18   \n",
       "120149        SPX           411.79  SPX920718P00250000  put 1992-07-18   \n",
       "120339        SPX           413.84  SPX920718P00250000  put 1992-07-18   \n",
       "120529        SPX           409.16  SPX920718P00250000  put 1992-07-18   \n",
       "120719        SPX           410.28  SPX920718P00250000  put 1992-07-18   \n",
       "120909        SPX           414.22  SPX920718P00250000  put 1992-07-18   \n",
       "121099        SPX           414.62  SPX920718P00250000  put 1992-07-18   \n",
       "121289        SPX           414.87  SPX920718P00250000  put 1992-07-18   \n",
       "121479        SPX           417.68  SPX920718P00250000  put 1992-07-18   \n",
       "121669        SPX           417.10  SPX920718P00250000  put 1992-07-18   \n",
       "121859        SPX           417.54  SPX920718P00250000  put 1992-07-18   \n",
       "122049        SPX           415.62  SPX920718P00250000  put 1992-07-18   \n",
       "\n",
       "        quotedate  strike   last  bid  ask  volume  openinterest  impliedvol  \\\n",
       "117271 1992-06-12   250.0  0.000  0.0  0.0       0             0      0.5202   \n",
       "117505 1992-06-15   250.0  0.031  0.0  0.0     250             0      0.5463   \n",
       "117743 1992-06-16   250.0  0.000  0.0  0.0       0             0      0.5485   \n",
       "117981 1992-06-17   250.0  0.000  0.0  0.0       0           250      0.5408   \n",
       "118219 1992-06-18   250.0  0.000  0.0  0.0       0           250      0.5452   \n",
       "118457 1992-06-19   250.0  0.000  0.0  0.0       0           250      0.5618   \n",
       "118645 1992-06-22   250.0  0.000  0.0  0.0       0           250      0.5933   \n",
       "118833 1992-06-23   250.0  0.000  0.0  0.0       0           250      0.6072   \n",
       "119021 1992-06-24   250.0  0.000  0.0  0.0       0           250      0.6194   \n",
       "119209 1992-06-25   250.0  0.000  0.0  0.0       0           250      0.6311   \n",
       "119397 1992-06-26   250.0  0.000  0.0  0.0       0           250      0.6466   \n",
       "119585 1992-06-29   250.0  0.000  0.0  0.0       0           250      0.7150   \n",
       "119773 1992-06-30   250.0  0.000  0.0  0.0       0           250      0.7327   \n",
       "119961 1992-07-01   250.0  0.000  0.0  0.0       0           250      0.7704   \n",
       "120149 1992-07-02   250.0  0.000  0.0  0.0       0           250      0.7914   \n",
       "120339 1992-07-06   250.0  0.000  0.0  0.0       0           250      0.9286   \n",
       "120529 1992-07-07   250.0  0.000  0.0  0.0       0           250      0.9527   \n",
       "120719 1992-07-08   250.0  0.000  0.0  0.0       0           250      1.0074   \n",
       "120909 1992-07-09   250.0  0.000  0.0  0.0       0           250      1.0846   \n",
       "121099 1992-07-10   250.0  0.000  0.0  0.0       0           250      1.1581   \n",
       "121289 1992-07-13   250.0  0.000  0.0  0.0       0           250      1.5091   \n",
       "121479 1992-07-14   250.0  0.000  0.0  0.0       0           250      1.7409   \n",
       "121669 1992-07-15   250.0  0.000  0.0  0.0       0           250      2.0753   \n",
       "121859 1992-07-16   250.0  0.000  0.0  0.0       0           250      2.7500   \n",
       "122049 1992-07-17   250.0  0.000  0.0  0.0       0           250      5.4547   \n",
       "\n",
       "         delta  gamma   theta    vega         optionalias  dte  \n",
       "117271 -0.0008    0.0 -0.0025  0.0035  SPX920718P00250000   36  \n",
       "117505 -0.0008    0.0 -0.0028  0.0034  SPX920718P00250000   33  \n",
       "117743 -0.0008    0.0 -0.0029  0.0033  SPX920718P00250000   32  \n",
       "117981 -0.0008    0.0 -0.0029  0.0033  SPX920718P00250000   31  \n",
       "118219 -0.0009    0.0 -0.0031  0.0033  SPX920718P00250000   30  \n",
       "118457 -0.0008    0.0 -0.0032  0.0032  SPX920718P00250000   29  \n",
       "118645 -0.0008    0.0 -0.0035  0.0030  SPX920718P00250000   26  \n",
       "118833 -0.0008    0.0 -0.0037  0.0030  SPX920718P00250000   25  \n",
       "119021 -0.0008    0.0 -0.0039  0.0029  SPX920718P00250000   24  \n",
       "119209 -0.0008    0.0 -0.0040  0.0029  SPX920718P00250000   23  \n",
       "119397 -0.0008    0.0 -0.0042  0.0028  SPX920718P00250000   22  \n",
       "119585 -0.0008    0.0 -0.0049  0.0025  SPX920718P00250000   19  \n",
       "119773 -0.0008    0.0 -0.0052  0.0025  SPX920718P00250000   18  \n",
       "119961 -0.0008    0.0 -0.0056  0.0024  SPX920718P00250000   17  \n",
       "120149 -0.0008    0.0 -0.0059  0.0023  SPX920718P00250000   16  \n",
       "120339 -0.0008    0.0 -0.0080  0.0020  SPX920718P00250000   12  \n",
       "120529 -0.0008    0.0 -0.0087  0.0019  SPX920718P00250000   11  \n",
       "120719 -0.0008    0.0 -0.0097  0.0018  SPX920718P00250000   10  \n",
       "120909 -0.0008    0.0 -0.0109  0.0017  SPX920718P00250000    9  \n",
       "121099 -0.0008    0.0 -0.0124  0.0016  SPX920718P00250000    8  \n",
       "121289 -0.0008    0.0 -0.0209  0.0012  SPX920718P00250000    5  \n",
       "121479 -0.0008    0.0 -0.0273  0.0010  SPX920718P00250000    4  \n",
       "121669 -0.0008    0.0 -0.0390  0.0009  SPX920718P00250000    3  \n",
       "121859 -0.0008    0.0 -0.0683  0.0007  SPX920718P00250000    2  \n",
       "122049 -0.0008    0.0 -0.2727  0.0003  SPX920718P00250000    1  "
      ]
     },
     "execution_count": 102,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df['optionroot'] == 'SPX920718P00250000']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Another issue are contracts with missing entries like the following, which stops showing up at 358 dte (it also has almost all rows with both ask and bid set to zero, so this is a particularly problematic contract)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>underlying</th>\n",
       "      <th>underlying_last</th>\n",
       "      <th>optionroot</th>\n",
       "      <th>type</th>\n",
       "      <th>expiration</th>\n",
       "      <th>quotedate</th>\n",
       "      <th>strike</th>\n",
       "      <th>last</th>\n",
       "      <th>bid</th>\n",
       "      <th>ask</th>\n",
       "      <th>volume</th>\n",
       "      <th>openinterest</th>\n",
       "      <th>impliedvol</th>\n",
       "      <th>delta</th>\n",
       "      <th>gamma</th>\n",
       "      <th>theta</th>\n",
       "      <th>vega</th>\n",
       "      <th>optionalias</th>\n",
       "      <th>dte</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1120981</th>\n",
       "      <td>SPX</td>\n",
       "      <td>1165.25</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>put</td>\n",
       "      <td>2003-12-20</td>\n",
       "      <td>2002-01-03</td>\n",
       "      <td>1450.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.1837</td>\n",
       "      <td>-0.7189</td>\n",
       "      <td>0.0011</td>\n",
       "      <td>-4.9932</td>\n",
       "      <td>550.1433</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>716</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1121467</th>\n",
       "      <td>SPX</td>\n",
       "      <td>1172.50</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>put</td>\n",
       "      <td>2003-12-20</td>\n",
       "      <td>2002-01-04</td>\n",
       "      <td>1450.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>200</td>\n",
       "      <td>0.1780</td>\n",
       "      <td>-0.7198</td>\n",
       "      <td>0.0012</td>\n",
       "      <td>-4.3687</td>\n",
       "      <td>552.3557</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>715</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1121957</th>\n",
       "      <td>SPX</td>\n",
       "      <td>1164.90</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>put</td>\n",
       "      <td>2003-12-20</td>\n",
       "      <td>2002-01-07</td>\n",
       "      <td>1450.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>200</td>\n",
       "      <td>0.1820</td>\n",
       "      <td>-0.7230</td>\n",
       "      <td>0.0011</td>\n",
       "      <td>-4.5666</td>\n",
       "      <td>544.5476</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>712</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1122447</th>\n",
       "      <td>SPX</td>\n",
       "      <td>1160.70</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>put</td>\n",
       "      <td>2003-12-20</td>\n",
       "      <td>2002-01-08</td>\n",
       "      <td>1450.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>200</td>\n",
       "      <td>0.1830</td>\n",
       "      <td>-0.7265</td>\n",
       "      <td>0.0011</td>\n",
       "      <td>-4.3912</td>\n",
       "      <td>538.8742</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>711</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1122940</th>\n",
       "      <td>SPX</td>\n",
       "      <td>1155.15</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>put</td>\n",
       "      <td>2003-12-20</td>\n",
       "      <td>2002-01-09</td>\n",
       "      <td>1450.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>200</td>\n",
       "      <td>0.1846</td>\n",
       "      <td>-0.7304</td>\n",
       "      <td>0.0011</td>\n",
       "      <td>-4.2222</td>\n",
       "      <td>532.0289</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>710</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1265123</th>\n",
       "      <td>SPX</td>\n",
       "      <td>895.82</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>put</td>\n",
       "      <td>2003-12-20</td>\n",
       "      <td>2002-12-20</td>\n",
       "      <td>1450.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>2421</td>\n",
       "      <td>0.2241</td>\n",
       "      <td>-0.9648</td>\n",
       "      <td>0.0002</td>\n",
       "      <td>1.5314</td>\n",
       "      <td>43.4461</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>365</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1265633</th>\n",
       "      <td>SPX</td>\n",
       "      <td>897.38</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>put</td>\n",
       "      <td>2003-12-20</td>\n",
       "      <td>2002-12-23</td>\n",
       "      <td>1450.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>2421</td>\n",
       "      <td>0.2170</td>\n",
       "      <td>-0.9666</td>\n",
       "      <td>0.0002</td>\n",
       "      <td>0.5313</td>\n",
       "      <td>36.1597</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>362</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1266143</th>\n",
       "      <td>SPX</td>\n",
       "      <td>892.47</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>put</td>\n",
       "      <td>2003-12-20</td>\n",
       "      <td>2002-12-24</td>\n",
       "      <td>1450.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>2419</td>\n",
       "      <td>0.2175</td>\n",
       "      <td>-0.9667</td>\n",
       "      <td>0.0002</td>\n",
       "      <td>-0.1834</td>\n",
       "      <td>33.7203</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>361</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1266653</th>\n",
       "      <td>SPX</td>\n",
       "      <td>889.66</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>put</td>\n",
       "      <td>2003-12-20</td>\n",
       "      <td>2002-12-26</td>\n",
       "      <td>1450.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>2419</td>\n",
       "      <td>0.2145</td>\n",
       "      <td>-0.9651</td>\n",
       "      <td>0.0002</td>\n",
       "      <td>-3.3717</td>\n",
       "      <td>28.2564</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>359</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1267163</th>\n",
       "      <td>SPX</td>\n",
       "      <td>875.40</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>put</td>\n",
       "      <td>2003-12-20</td>\n",
       "      <td>2002-12-27</td>\n",
       "      <td>1450.0</td>\n",
       "      <td>550.0</td>\n",
       "      <td>571.3</td>\n",
       "      <td>574.3</td>\n",
       "      <td>0</td>\n",
       "      <td>2419</td>\n",
       "      <td>0.2282</td>\n",
       "      <td>-0.9625</td>\n",
       "      <td>0.0002</td>\n",
       "      <td>-3.8675</td>\n",
       "      <td>32.5230</td>\n",
       "      <td>SXG031220P01450000</td>\n",
       "      <td>358</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>249 rows × 19 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        underlying  underlying_last          optionroot type expiration  \\\n",
       "1120981        SPX          1165.25  SXG031220P01450000  put 2003-12-20   \n",
       "1121467        SPX          1172.50  SXG031220P01450000  put 2003-12-20   \n",
       "1121957        SPX          1164.90  SXG031220P01450000  put 2003-12-20   \n",
       "1122447        SPX          1160.70  SXG031220P01450000  put 2003-12-20   \n",
       "1122940        SPX          1155.15  SXG031220P01450000  put 2003-12-20   \n",
       "...            ...              ...                 ...  ...        ...   \n",
       "1265123        SPX           895.82  SXG031220P01450000  put 2003-12-20   \n",
       "1265633        SPX           897.38  SXG031220P01450000  put 2003-12-20   \n",
       "1266143        SPX           892.47  SXG031220P01450000  put 2003-12-20   \n",
       "1266653        SPX           889.66  SXG031220P01450000  put 2003-12-20   \n",
       "1267163        SPX           875.40  SXG031220P01450000  put 2003-12-20   \n",
       "\n",
       "         quotedate  strike   last    bid    ask  volume  openinterest  \\\n",
       "1120981 2002-01-03  1450.0    0.0    0.0    0.0       0             0   \n",
       "1121467 2002-01-04  1450.0    0.0    0.0    0.0       0           200   \n",
       "1121957 2002-01-07  1450.0    0.0    0.0    0.0       0           200   \n",
       "1122447 2002-01-08  1450.0    0.0    0.0    0.0       0           200   \n",
       "1122940 2002-01-09  1450.0    0.0    0.0    0.0       0           200   \n",
       "...            ...     ...    ...    ...    ...     ...           ...   \n",
       "1265123 2002-12-20  1450.0    0.0    0.0    0.0       0          2421   \n",
       "1265633 2002-12-23  1450.0    0.0    0.0    0.0       0          2421   \n",
       "1266143 2002-12-24  1450.0    0.0    0.0    0.0       0          2419   \n",
       "1266653 2002-12-26  1450.0    0.0    0.0    0.0       0          2419   \n",
       "1267163 2002-12-27  1450.0  550.0  571.3  574.3       0          2419   \n",
       "\n",
       "         impliedvol   delta   gamma   theta      vega         optionalias  dte  \n",
       "1120981      0.1837 -0.7189  0.0011 -4.9932  550.1433  SXG031220P01450000  716  \n",
       "1121467      0.1780 -0.7198  0.0012 -4.3687  552.3557  SXG031220P01450000  715  \n",
       "1121957      0.1820 -0.7230  0.0011 -4.5666  544.5476  SXG031220P01450000  712  \n",
       "1122447      0.1830 -0.7265  0.0011 -4.3912  538.8742  SXG031220P01450000  711  \n",
       "1122940      0.1846 -0.7304  0.0011 -4.2222  532.0289  SXG031220P01450000  710  \n",
       "...             ...     ...     ...     ...       ...                 ...  ...  \n",
       "1265123      0.2241 -0.9648  0.0002  1.5314   43.4461  SXG031220P01450000  365  \n",
       "1265633      0.2170 -0.9666  0.0002  0.5313   36.1597  SXG031220P01450000  362  \n",
       "1266143      0.2175 -0.9667  0.0002 -0.1834   33.7203  SXG031220P01450000  361  \n",
       "1266653      0.2145 -0.9651  0.0002 -3.3717   28.2564  SXG031220P01450000  359  \n",
       "1267163      0.2282 -0.9625  0.0002 -3.8675   32.5230  SXG031220P01450000  358  \n",
       "\n",
       "[249 rows x 19 columns]"
      ]
     },
     "execution_count": 109,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df['optionroot'] == 'SXG031220P01450000']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Once again, we will drop contracts with missing entries."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "unique_contracts_per_day = df.groupby('quotedate').apply(lambda x: x['optionroot'].nunique())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's plot the number of contracts per day to compare after the cleanup."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAD8CAYAAACVZ8iyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXxU1fn48c+THUggLGELaADZcQEj4oYLiIBVbKsWf7bi0tLWXWtda7Uiar/2Wy1tpaWK4lKRWvvVuiEi7iIEUBQQ2SGAJBCWkH15fn/cmzBJZiaZyWSW5Hm/Xrxy59xz7zwZ4zz3nnPuOaKqGGOMadviIh2AMcaYyLNkYIwxxpKBMcYYSwbGGGOwZGCMMQZLBsYYY4CESAcQrG7dumlWVlakwzDGmJiyYsWKvaqaUb88ZpNBVlYWOTk5kQ7DGGNiiohs81ZuzUTGGGMsGRhjjLFkYIwxBksGxhhjsGRgjDEGSwbGGBNSB4sr2HWgJNJhBMySgTHGhND4xz7g1Efei3QYAbNkYIwxIZRfWBbpEIJiycAYY4wlA2OMaQmxtoqkJQNjjGkBZZXVkQ4hIJYMjDGmBZSUV0U6hIBYMjDGmBZwsKQi0iEExJKBMca0gIfeXBfpEAJiycAYY1rAO2v3RDqEgDSaDER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OKYLSI5IrJGRH7nlt2Is0LZEhFZ4pZNEJHPRGSliPxLRFLD+XmZtiEmn0A2JlgiciLOgjAjcf7+V+IuCOPDdQCqeqw4S0u+g7MS1m+BbFW93j3vQ8B7qnq1OOsULxNn0aKfA8WqepyIHEfdCebuUdUCd16cxSJynKrOEmf5xLNVda84a+r+BmdVviIRuQO4FScZGRMylgxMW3MG8J+aWWFF5LVG6p+Os+whqvqNiGzDSQb1TQAudJ8wB0gBjsJZlnKWe/xqEfFc0/dScRYwSsBZrWwYUH/N3zFu+SfuZJlJwGdN+D2NCYglA9MWeXvSspIjzaYpHuVNna5YgB+q6vo6hc4XeIP3E5F+wG04ixftF5Fn6r2v53kXqeplTYzDmKBYn4Fpaz4Evu+25acBF7jlW4ET3e2L69W/HEBEBuFc7a/Hmd44zaPeQuCGmrnu3UnP6h8/AjjOLe8IFAEHRaQHMMnjXJ7nXgqcJiLHuOdo78ZhTEhZMjBtiqquxFk8/gvg38BH7q4/AL8UkU+Bbh6HPIGzUPpX7nFXupOYLQGG1XQg46ydmwisFpGvObLe9Wwg1W0euh1Y5sbxJbAKWAPMxVn+tMYc4C0RWaKq+ThLML7onmMpMCRUn4cxNWxuItOmicj9wGFV/UOkYzEmkuzOwBhjjN0ZGGOMsTsDY4wxWDIwxhiDJQNjjDFYMjDGGIMlA2OMMVgyMMYYA/x/xtmvPwE10Q0AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "unique_contracts_per_day.plot();"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {},
   "outputs": [],
   "source": [
    "# to_clean is a set with the contracts with missing entries to then drop.\n",
    "current_contracts = set()\n",
    "to_clean = set()\n",
    "for _, options in df.groupby('quotedate'):\n",
    "    current_contracts = current_contracts.union(set(options['optionroot']))\n",
    "    current_contracts = current_contracts.difference(set(options[options['dte'] <= 1]['optionroot']))\n",
    "    missing_contracts = current_contracts.difference(set(options['optionroot']))\n",
    "    to_clean = to_clean.union(missing_contracts)\n",
    "to_clean = to_clean.union(current_contracts)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [],
   "source": [
    "to_clean_df = df[df['optionroot'].isin(list(to_clean))]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [],
   "source": [
    "new_df = df.drop(to_clean_df.index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [],
   "source": [
    "new_df.reset_index(inplace=True, drop=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Drop the contracts that have a row with both their ask and bid zero.\n",
    "contracts_with_zero = new_df[(new_df['ask'] == 0) & (new_df['bid'] == 0)]['optionroot'].unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [],
   "source": [
    "final_df = new_df.drop(new_df[new_df['optionroot'].isin(contracts_with_zero)].index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [],
   "source": [
    "final_df.reset_index(inplace=True, drop=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.6339574482236837"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "final_df['optionroot'].nunique() / df['optionroot'].nunique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(9245562, 19)"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "final_df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "metadata": {},
   "outputs": [],
   "source": [
    "unique_contracts_per_day_final = final_df.groupby('quotedate').apply(lambda x: x['optionroot'].nunique())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAD8CAYAAACVZ8iyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXhU5dn48e89k40khLCEHQQLoqCISnHfFdxabOv6+qu21tr2delm1W7SulRta7W21VfrUmyr1q3VikpRca2iERFEAcMe1kAgJCHbzNy/P86ZZCaZLZPJLHB/ritXZp6zzJ0Qzn2e5TyPqCrGGGP2bp5MB2CMMSbzLBkYY4yxZGCMMcaSgTHGGCwZGGOMwZKBMcYYIC/TASRr0KBBOmbMmEyHYYwxOeODDz7YpqoVkbblbDIYM2YMlZWVmQ7DGGNyhoisjbbNmomMMcbETwYi8pCIbBWRj0PKBojIPBH5zP3e3y0XEblbRKpEZLGIHBpyzCXu/p+JyCUh5YeJyBL3mLtFRFL9QxpjjIktkZrBX4DTOpVdD7yiquOBV9z3AKcD492vy4F7wUkewCzgcGAaMCuYQNx9Lg85rvNnGWOM6WVxk4GqvgHUdiqeCcx2X88Gzg4pf0Qd7wLlIjIMmAHMU9VaVd0BzANOc7eVqeo76kyS9EjIuYwxxqRJsn0GQ1R1E4D7fbBbPgJYH7JftVsWq7w6QnlEInK5iFSKSGVNTU2SoRtjjOks1R3Ikdr7NYnyiFT1flWdqqpTKyoijo4yxpg9ytrtjexu9fX65ySbDLa4TTy437e65dXAqJD9RgIb45SPjFBujDEGOP43r3HpX97v9c9JNhk8BwRHBF0CPBtSfrE7qugIoM5tRpoLTBeR/m7H8XRgrrutXkSOcEcRXRxyLmOMMcC7qzp326Ze3IfOROQx4ARgkIhU44wKug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fAR8CCwFHsJZ/jTofuBFEZmvqjU4SzA+5p7jXWD/VP0+jAmyuYnMXk1EfgE0qOpvMx2LMZlkNQNjjDFWMzDGGGM1A2OMMVgyMMYYgyUDY4wxWDIwxhiDJQNjjDFYMjDGGAP8f24NO2XRqEIyAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "unique_contracts_per_day_final.plot();"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {},
   "outputs": [],
   "source": [
    "store_path = os.path.join(\"/Users/jrchatruc/Documents/backtester_options/allspx/\", \"options_data_v2_pruned.h5\")\n",
    "store = pd.HDFStore(store_path, complevel=9, complib=\"blosc\", fletcher32=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [],
   "source": [
    "sizes = {\"optionroot\": 20, \"optionalias\": 20}\n",
    "store.append(\"/SPX\", final_df, index=False, data_columns=True, min_itemsize=sizes)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [],
   "source": [
    "store.close()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
